package com.hsf;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.taobao.hsf.hsfunit.HSFEasyStarter;
import com.taobao.logistics.domain.result.LogisticsInfoResult;
import com.taobao.logistics.service.LogisticsOrderService;

public class TestHsf {

	public static void main(String[] args) {
		HSFEasyStarter.start("/usr/local/project/ali/hsf", "2.1.0.7");
		try {
			Thread.sleep(5000L);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		ApplicationContext ap = new ClassPathXmlApplicationContext(
				"hsf-spring.xml");
		LogisticsOrderService bean = (LogisticsOrderService) ap
				.getBean("logisticsOrderService");

		com.taobao.hsf.hsfunit.util.ServiceUtil.waitServiceReady(bean);
		
		LogisticsInfoResult inforesult = bean.queryLogisticsInfo(241234L, 241234L);
		
		System.out.println(inforesult.getResultCode());
	}

}
